<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
	xmlns:h="http://java.sun.com/jsf/html"
	xmlns:f="http://java.sun.com/jsf/core"
	xmlns:s="http://jboss.com/products/seam/taglib"
	xmlns:ui="http://java.sun.com/jsf/facelets"
	xmlns:a="http://richfaces.org/a4j">

<!-- 
		Replace path to template, title, header and body
		with actual data.
	 -->
<ui:composition template="/WEB-INF/template.xhtml">
	<ui:define name="topnav">
		<ui:include src="/include/admin_nav.xhtml" />
	</ui:define>
	<ui:define name="sidebar">
		<ui:include src="/include/left_nav.xhtml" />
	</ui:define>
	<ui:define name="body">
		<div class="body-title">Edit Type Of Property</div>
		<h:form id="editTypeOfProperty">
			<fieldset>
			<s:validateAll>

				<f:facet name="aroundInvalidField">
					<s:span styleClass="errors" />
				</f:facet>

				<div class="entry">
				<div class="label"><h:outputLabel for="typeName">Property Type's Name:</h:outputLabel></div>
				<div class="input"><s:decorate id="typeNameDecorate">
					<h:inputText id="typeName" value="#{vtypeofproperty.typeName}" required="true">
						<a:support event="onblur" reRender="typeNameErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="typeNameErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

				<div class="entry">
				<div class="label"><h:outputLabel for="typeDesc">Description:</h:outputLabel></div>
				<div class="input"><s:decorate id="typeDescDecorate">
					<h:inputText id="typeDesc" value="#{vtypeofproperty.typeDesc}" required="true">
						<a:support event="onblur" reRender="typeDescErrors" />
					</h:inputText>
					<br />
					<a:outputPanel id="typeDescErrors">
						<s:message />
					</a:outputPanel>
				</s:decorate></div>
				</div>

			</s:validateAll>

			<div class="entry errors"><h:messages id="messages"
				globalOnly="true" /></div>

			<div class="entry">
			<div class="label">&#160;</div>
			<div class="input">
			<h:commandButton id="addNew"
				value="Add New" action="#{typeOfProperty.createItem}" rendered="#{typeOfProperty.notEditing()}"/>&#160; 
			<h:commandButton id="updateItem"
				value="Update" action="#{typeOfProperty.updateItem}" rendered="#{typeOfProperty.editting}" />&#160; 
							<h:commandButton action="cancel" value="Cancel" /></div>
			</div>

			</fieldset>
		</h:form>
	</ui:define>
</ui:composition>

</html>